package com.eduhzy.ttw.commonsdk.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @author xubo
 * @date 2018/8/30 21:11
 */
public class MyWorksData implements Parcelable {

    /**
     * awardLevel : 0
     * createTime : 1535850117000
     * fileType : 2
     * hasVoted : 0
     * img : http://192.168.0.108:8299/r/cms/www/yxs/img/word.jpg
     * pvCount : 3
     * researchId : 777
     * researchWorksNo : NO.10
     * status : 0
     * statusStr : 待审
     * voteCount : 0
     * worksId : 6601
     * worksItemData : {"attachmentList":[{"attachType":647,"createDate":1535817600000,"displayName":"20180823125730.mp4","fileSize":0,"id":6586,"objectId":6601,"remoteId":67569074704728064,"suffix":""}],"dataContent":"","dataType":1,"describes":"要求为参评的作品文档。","fileCount":1,"fileType":0,"fileTypeName":"所有类","id":647,"isMust":1,"isPublic":1,"isUpload":0,"maxNum":1,"maxSize":1073741824,"name":"论文作品","realMaxSize":1024,"researchId":777,"seq":2,"worksId":6601}
     * worksName : 图拉丁
     */
    private String createName;
    private String createUnit;
    private int awardLevel;
    private long createTime;
    private int fileType;
    private int hasVoted;
    private String img;
    private int pvCount;
    private int researchId;
    private String researchWorksNo;
    private int status;
    private String statusStr;
    private int voteCount;
    private int worksId;
    private WorksItemDataBean worksItemData;
    private String worksName;


    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public String getCreateUnit() {
        return createUnit;
    }

    public void setCreateUnit(String createUnit) {
        this.createUnit = createUnit;
    }

    public int getAwardLevel() {
        return awardLevel;
    }

    public void setAwardLevel(int awardLevel) {
        this.awardLevel = awardLevel;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public int getHasVoted() {
        return hasVoted;
    }

    public void setHasVoted(int hasVoted) {
        this.hasVoted = hasVoted;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public int getPvCount() {
        return pvCount;
    }

    public void setPvCount(int pvCount) {
        this.pvCount = pvCount;
    }

    public int getResearchId() {
        return researchId;
    }

    public void setResearchId(int researchId) {
        this.researchId = researchId;
    }

    public String getResearchWorksNo() {
        return researchWorksNo;
    }

    public void setResearchWorksNo(String researchWorksNo) {
        this.researchWorksNo = researchWorksNo;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getStatusStr() {
        return statusStr;
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    public int getVoteCount() {
        return voteCount;
    }

    public void setVoteCount(int voteCount) {
        this.voteCount = voteCount;
    }

    public int getWorksId() {
        return worksId;
    }

    public void setWorksId(int worksId) {
        this.worksId = worksId;
    }

    public WorksItemDataBean getWorksItemData() {
        return worksItemData;
    }

    public void setWorksItemData(WorksItemDataBean worksItemData) {
        this.worksItemData = worksItemData;
    }

    public String getWorksName() {
        return worksName;
    }

    public void setWorksName(String worksName) {
        this.worksName = worksName;
    }

    public static class WorksItemDataBean implements Parcelable {

        /**
         * attachmentList : [{"attachType":647,"createDate":1535817600000,"displayName":"20180823125730.mp4","fileSize":0,"id":6586,"objectId":6601,"remoteId":67569074704728064,"suffix":""}]
         * dataContent :
         * dataType : 1
         * describes : 要求为参评的作品文档。
         * fileCount : 1
         * fileType : 0
         * fileTypeName : 所有类
         * id : 647
         * isMust : 1
         * isPublic : 1
         * isUpload : 0
         * maxNum : 1
         * maxSize : 1073741824
         * name : 论文作品
         * realMaxSize : 1024
         * researchId : 777
         * seq : 2
         * worksId : 6601
         */

        private String dataContent;
        private int dataType;
        private String describes;
        private int fileCount;
        private int fileType;
        private String fileTypeName;
        private int id;
        private int isMust;
        private int isPublic;
        private int isUpload;
        private int maxNum;
        private int maxSize;
        private String name;
        private int realMaxSize;
        private int researchId;
        private int seq;
        private int worksId;
        private List<AttachmentListBean> attachmentList;

        public String getDataContent() {
            return dataContent;
        }

        public void setDataContent(String dataContent) {
            this.dataContent = dataContent;
        }

        public int getDataType() {
            return dataType;
        }

        public void setDataType(int dataType) {
            this.dataType = dataType;
        }

        public String getDescribes() {
            return describes;
        }

        public void setDescribes(String describes) {
            this.describes = describes;
        }

        public int getFileCount() {
            return fileCount;
        }

        public void setFileCount(int fileCount) {
            this.fileCount = fileCount;
        }

        public int getFileType() {
            return fileType;
        }

        public void setFileType(int fileType) {
            this.fileType = fileType;
        }

        public String getFileTypeName() {
            return fileTypeName;
        }

        public void setFileTypeName(String fileTypeName) {
            this.fileTypeName = fileTypeName;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getIsMust() {
            return isMust;
        }

        public void setIsMust(int isMust) {
            this.isMust = isMust;
        }

        public int getIsPublic() {
            return isPublic;
        }

        public void setIsPublic(int isPublic) {
            this.isPublic = isPublic;
        }

        public int getIsUpload() {
            return isUpload;
        }

        public void setIsUpload(int isUpload) {
            this.isUpload = isUpload;
        }

        public int getMaxNum() {
            return maxNum;
        }

        public void setMaxNum(int maxNum) {
            this.maxNum = maxNum;
        }

        public int getMaxSize() {
            return maxSize;
        }

        public void setMaxSize(int maxSize) {
            this.maxSize = maxSize;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getRealMaxSize() {
            return realMaxSize;
        }

        public void setRealMaxSize(int realMaxSize) {
            this.realMaxSize = realMaxSize;
        }

        public int getResearchId() {
            return researchId;
        }

        public void setResearchId(int researchId) {
            this.researchId = researchId;
        }

        public int getSeq() {
            return seq;
        }

        public void setSeq(int seq) {
            this.seq = seq;
        }

        public int getWorksId() {
            return worksId;
        }

        public void setWorksId(int worksId) {
            this.worksId = worksId;
        }

        public List<AttachmentListBean> getAttachmentList() {
            return attachmentList;
        }

        public void setAttachmentList(List<AttachmentListBean> attachmentList) {
            this.attachmentList = attachmentList;
        }

        public static class AttachmentListBean implements Parcelable {

            /**
             * attachType : 647
             * createDate : 1535817600000
             * displayName : 20180823125730.mp4
             * fileSize : 0
             * id : 6586
             * objectId : 6601
             * remoteId : 67569074704728064
             * suffix :
             */

            private int attachType;
            private long createDate;
            private String displayName;
            private int fileSize;
            private int id;
            private int objectId;
            private long remoteId;
            private String suffix;

            public int getAttachType() {
                return attachType;
            }

            public void setAttachType(int attachType) {
                this.attachType = attachType;
            }

            public long getCreateDate() {
                return createDate;
            }

            public void setCreateDate(long createDate) {
                this.createDate = createDate;
            }

            public String getDisplayName() {
                return displayName;
            }

            public void setDisplayName(String displayName) {
                this.displayName = displayName;
            }

            public int getFileSize() {
                return fileSize;
            }

            public void setFileSize(int fileSize) {
                this.fileSize = fileSize;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public int getObjectId() {
                return objectId;
            }

            public void setObjectId(int objectId) {
                this.objectId = objectId;
            }

            public long getRemoteId() {
                return remoteId;
            }

            public void setRemoteId(long remoteId) {
                this.remoteId = remoteId;
            }

            public String getSuffix() {
                return suffix;
            }

            public void setSuffix(String suffix) {
                this.suffix = suffix;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.attachType);
                dest.writeLong(this.createDate);
                dest.writeString(this.displayName);
                dest.writeInt(this.fileSize);
                dest.writeInt(this.id);
                dest.writeInt(this.objectId);
                dest.writeLong(this.remoteId);
                dest.writeString(this.suffix);
            }

            public AttachmentListBean() {
            }

            protected AttachmentListBean(Parcel in) {
                this.attachType = in.readInt();
                this.createDate = in.readLong();
                this.displayName = in.readString();
                this.fileSize = in.readInt();
                this.id = in.readInt();
                this.objectId = in.readInt();
                this.remoteId = in.readLong();
                this.suffix = in.readString();
            }

            public static final Creator<AttachmentListBean> CREATOR = new Creator<AttachmentListBean>() {
                @Override
                public AttachmentListBean createFromParcel(Parcel source) {
                    return new AttachmentListBean(source);
                }

                @Override
                public AttachmentListBean[] newArray(int size) {
                    return new AttachmentListBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.dataContent);
            dest.writeInt(this.dataType);
            dest.writeString(this.describes);
            dest.writeInt(this.fileCount);
            dest.writeInt(this.fileType);
            dest.writeString(this.fileTypeName);
            dest.writeInt(this.id);
            dest.writeInt(this.isMust);
            dest.writeInt(this.isPublic);
            dest.writeInt(this.isUpload);
            dest.writeInt(this.maxNum);
            dest.writeInt(this.maxSize);
            dest.writeString(this.name);
            dest.writeInt(this.realMaxSize);
            dest.writeInt(this.researchId);
            dest.writeInt(this.seq);
            dest.writeInt(this.worksId);
            dest.writeList(this.attachmentList);
        }

        public WorksItemDataBean() {
        }

        protected WorksItemDataBean(Parcel in) {
            this.dataContent = in.readString();
            this.dataType = in.readInt();
            this.describes = in.readString();
            this.fileCount = in.readInt();
            this.fileType = in.readInt();
            this.fileTypeName = in.readString();
            this.id = in.readInt();
            this.isMust = in.readInt();
            this.isPublic = in.readInt();
            this.isUpload = in.readInt();
            this.maxNum = in.readInt();
            this.maxSize = in.readInt();
            this.name = in.readString();
            this.realMaxSize = in.readInt();
            this.researchId = in.readInt();
            this.seq = in.readInt();
            this.worksId = in.readInt();
            this.attachmentList = new ArrayList<AttachmentListBean>();
            in.readList(this.attachmentList, AttachmentListBean.class.getClassLoader());
        }

        public static final Creator<WorksItemDataBean> CREATOR = new Creator<WorksItemDataBean>() {
            @Override
            public WorksItemDataBean createFromParcel(Parcel source) {
                return new WorksItemDataBean(source);
            }

            @Override
            public WorksItemDataBean[] newArray(int size) {
                return new WorksItemDataBean[size];
            }
        };
    }

    public MyWorksData() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.createName);
        dest.writeString(this.createUnit);
        dest.writeInt(this.awardLevel);
        dest.writeLong(this.createTime);
        dest.writeInt(this.fileType);
        dest.writeInt(this.hasVoted);
        dest.writeString(this.img);
        dest.writeInt(this.pvCount);
        dest.writeInt(this.researchId);
        dest.writeString(this.researchWorksNo);
        dest.writeInt(this.status);
        dest.writeString(this.statusStr);
        dest.writeInt(this.voteCount);
        dest.writeInt(this.worksId);
        dest.writeParcelable(this.worksItemData, flags);
        dest.writeString(this.worksName);
    }

    protected MyWorksData(Parcel in) {
        this.createName = in.readString();
        this.createUnit = in.readString();
        this.awardLevel = in.readInt();
        this.createTime = in.readLong();
        this.fileType = in.readInt();
        this.hasVoted = in.readInt();
        this.img = in.readString();
        this.pvCount = in.readInt();
        this.researchId = in.readInt();
        this.researchWorksNo = in.readString();
        this.status = in.readInt();
        this.statusStr = in.readString();
        this.voteCount = in.readInt();
        this.worksId = in.readInt();
        this.worksItemData = in.readParcelable(WorksItemDataBean.class.getClassLoader());
        this.worksName = in.readString();
    }

    public static final Creator<MyWorksData> CREATOR = new Creator<MyWorksData>() {
        @Override
        public MyWorksData createFromParcel(Parcel source) {
            return new MyWorksData(source);
        }

        @Override
        public MyWorksData[] newArray(int size) {
            return new MyWorksData[size];
        }
    };
}
